RFC 7639 ALPN #731
Conversation
42fd028 to
6140646
Compare
4b95aca to
8f872b6
Compare
aea3fa3 to
5fa9a19
Compare
5fa9a19 to
16b5442
Compare
|
@arturobernalg Could you please rebase this change-set? |
cc58cd1 to
208b565
Compare
@ok2c done. |
208b565 to
eed86b1
Compare
733a98c to
a910585
Compare
a178fe7 to
e343841
Compare
249924c to
bfb72b3
Compare
bfb72b3 to
f5f17fd
Compare
| * @return this builder | ||
| * @since 5.6 | ||
| */ | ||
| public HttpAsyncClientBuilder setConnectAlpn(final String... ids) { |
There was a problem hiding this comment.
@arturobernalg What should happen if the caller passes h3, http/0.75, srtuff to this method?
Why do we even need this method at all? There is already HttpVersionPolicy settable on a per route basis and this is exactly what you should be using should you decide to proceed further with this feature.
|
@arturobernalg This change can still make it into |
Encode protocol IDs with core's PercentCodec.HTTP_TOKEN (canonical RFC 7230 tchar form, uppercase hex) and decode strictly, rejecting malformed percent-encoding with ProtocolException. Configure via ConnectAlpnProvider through setConnectAlpnProvider on the classic and async builders; ConnectExec/AsyncConnectExec emit the header when a provider is set.
@ok2c please do another pass |
| * @return list of protocol IDs (e.g., {@code "h2"}, {@code "http/1.1"}); | ||
| * {@code null} or empty to omit the header | ||
| */ | ||
| List<String> getAlpnForTunnel(HttpHost target, HttpRoute route); |
There was a problem hiding this comment.
@arturobernalg Same question that I already asked you before. What do you think should happen if this provider returns something other than h2 or http/1.1 from supported ApplicationProtocol enum? Why do we need this interface at all?
Add ConnectAlpnProvider and inject ALPN header in ConnectExec/AsyncConnectExec. Provide builder hooks for fixed list or provider-driven values.